home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / tex / strunk / disk_6 / inputs_2.lzh / inputs / lib / local / art.mf next >
Encoding:
Text File  |  1990-04-18  |  2.7 KB  |  86 lines

  1. % This file can be loaded after plain.mf.
  2. % It introduces conventions that are commonly used on my home computer.
  3. base_version:=base_version&"/art";
  4.  
  5. screen_rows:=1024; screen_cols:=1024;
  6.  
  7. % Here are conventions for local output devices:
  8.  
  9. mode_def imagen =  % imagen mode: for the Imagen 8/300 (Canon engine)
  10.  proofing:=0;      % no, we're not making proofs
  11.  fontmaking:=1;      % yes, we are making a font
  12.  tracingtitles:=0;    % no, don't show titles in the log
  13.  pixels_per_inch:=300;
  14.  blacker:=0;      % Canon engine is black enough
  15.  fillin:=.2;      % and it tends to fill in diagonals
  16.  o_correction:=.6;    %
  17.  enddef;
  18.  
  19. mode_def aps =    % aps mode: for the Autologic APS-Micro5
  20.  proofing:=0;      % no, we're not making proofs
  21.  fontmaking:=1;      % yes, we are making a font
  22.  tracingtitles:=1;      % yes, show titles online
  23.  pixels_per_inch:=722.909;    % that's roughly 10 per pt
  24.  blacker:=.2;      % make pens a teeny bit blacker
  25.  fillin:=.2;      % but compensate for diagonal fillin
  26.  o_correction:=1;      % and keep the full overshoot
  27.  enddef;
  28.  
  29. localfont:=imagen;
  30.  
  31. % Macros to add mode information specials to fonts. (by Pierre MacKay)
  32.  
  33. def mode_special(suffix $) =
  34.   string s,d;
  35.   s:=str$; d:=decimal scantokens s;
  36.   special s&":="&d&";" enddef;
  37.  
  38. def font_mode_specials =
  39.  p_p_i=pixels_per_inch/mag; 
  40.  if fontmaking > 0:
  41.  begingroup; save d,s,p; save pixels_per_inch;
  42.   string p;
  43.   pixels_per_inch:=p_p_i;
  44.   special jobname;
  45.   mode_special(mag);
  46.   if string mode: p:=mode;
  47.   else: p:=substring(0,length(mode_name[mode])-1) of mode_name[mode]; fi
  48.   special "mode:="&p&";";
  49.   mode_special(pixels_per_inch);
  50.   mode_special(blacker);
  51.   mode_special(fillin);
  52.   mode_special(o_correction);
  53.  endgroup;
  54.  fi
  55. enddef;
  56.  
  57. % Finally, here are macros for Xerox-world font info:
  58.  
  59. def font_family expr s =  % string s names the font family, e.g., "CMR"
  60.  headerbyte 49: BCPL_string(s,20);
  61.  special "identifier "&s enddef;
  62. def coding_scheme expr s = % string s names the scheme, e.g. "TEX TEXT"
  63.  headerbyte 9: BCPL_string(s,40);
  64.  special "codingscheme "&s enddef;
  65. def font_face_byte expr x = % integer x gives the family member number,
  66.  headerbyte 72: x;          % which should be between 0 and 255
  67.  special "fontfacebyte"; numspecial x enddef;
  68.  
  69. def BCPL_string(expr s,n)= % string s becomes an n-byte BCPL string
  70.  for l:=if length(s)>=n: n-1 else: length(s) fi: l
  71.   for k:=1 upto l: , substring (k-1,k) of s endfor
  72.   for k:=l+2 upto n: , 0 endfor endfor enddef;
  73.  
  74. Xerox_world:=1;    % users can say `if known Xerox_world:...fi'
  75.  
  76. inner end;
  77. def bye=
  78.  if fontmaking>0: font_family font_identifier_;
  79.   coding_scheme font_coding_scheme_;
  80.   font_face_byte max(0,254-round 2designsize);
  81.   font_mode_specials; fi
  82.  end
  83.  enddef;
  84.  
  85. outer bye,end;
  86.